#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include <assert.h>


char* My_strncopy(char* dest,  const char* sour, int num)
{
	assert(dest && sour);
	char* ret = dest;
	int count = 1;
	while (*sour != '\0' && count <=num)
	{
		*dest = *sour;
		count++;
		dest++;
		sour++;
		
		
	}
	return ret;


   }


int main()
{
	char Arr1[101] = "hello";
	char Arr2[101] = "Lucyab";
	My_strncopy(Arr1, Arr2, 6);
	printf("%s", Arr1);





	return 0;
}

